#import "Wolf.h"

@implementation Wolf


//构造函数
-(Wolf *)initWithName:(int) aName ASScore:(int) aASScore appearArr:(NSArray *)aAppearArr beHitArr:(NSArray *)aBeHitArr{

self=[super init];
if(self){
    self.name=aName;
    self.ASScore=aASScore;
    self.appearArr=aAppearArr;
    self.beHitArr=aBeHitArr;
    self.userInteractionEnabled = YES;
}
    return self;
}

-(void)appear{
    self.animationImages = self.appearArr;//加载动画所需图片数组
    self.animationDuration = WORF_TIME; //浏览整个图片一次所用的时间
    self.animationRepeatCount = 1; // 0 = loops forever 动画重复次数
    [self startAnimating];//开始动画
    
}

-(void)beHit{
    self.animationImages = self.beHitArr;//加载动画所需图片数组
    self.animationDuration = WORF_TIME*3/10; //浏览整个图片一次所用的时间
    self.animationRepeatCount = 1; // 0 = loops forever 动画重复次数
    [self startAnimating];//开始动画
}

-(void)dealloc{
    self.appearArr=nil;
    self.beHitArr=nil;
}

@end
